package jsd2302.src.File;

import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) throws IOException {
        Scanner scan=new Scanner(System.in);
        String name=scan.next();
        System.out.println("请输入你的文件名："+name);
        File dir=new File("./"+name+".txt");
        if(dir.exists()){
            System.out.println("文件已存在");
        }else{
            dir.mkdir();
            System.out.println("文件已创建");
        }

    }
}
